package com.datang.petstore.controller;

import com.datang.petstore.entity.PetMold;
import com.datang.petstore.resultpage.Result;
import com.datang.petstore.service.PetMoldService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
/*
 * @auther 顶风少年
 * @mail dfsn19970313@foxmail.com
 * @date 2019-10-30 15:02
 * @notify 宠物类型 Api
 * @version 1.0
 */

@RestController
public class PetMoldController {

    @Autowired
    private PetMoldService petMoldService;

    /*
     * @author 顶风少年
     * @date 2019/10/30 15:02
     * @mail dfsn199703132038@foxmail.com
     * @throws
     * @param
     * @result com.datang.petstore.utils.Result
     * @notify 获取全部宠物的类型
     * version 1.0
     */
    @GetMapping(value="petmold")
    public Result getAll() {
        List<PetMold> all = petMoldService.getAllPetMold();
        return Result.ok(all);
    }
}
